package cn.endeavour.org.mapper;

import cn.endeavour.basic.mapper.BaseMapper;
import cn.endeavour.org.domain.Employee;
import cn.endeavour.org.domain.Shop;
import org.springframework.stereotype.Repository;

/**
 * 员工mapper
 */
@Repository
public interface EmployeeMapper extends BaseMapper<Employee> {

    /**
     * 店铺入驻成功后添加店铺id
     * @param shop
     */
    void updateShopId(Shop shop);

    /**
     * 查询员工是否重复
     * @param admin
     * @return
     */
    Employee findByAccount(Employee admin);

    /**
     * 在中间表添加数据
     * @param shop
     */
    void addShop(Shop shop);

    /**
     * 得到已经存在员工的id
     * @param admin
     * @return
     */
    Long findAccountId(Employee admin);

    /**
     * 通过登录信息id查询员工
     * @param id
     * @return
     */
    Employee findByLoginInfoId(Long id);
}
